import axios from "axios"
import { Toast } from "antd-mobile"
const instance = axios.create({
    baseURL:"https://www.linweiqin.cn/api/public/v1/",
});
//请求的拦截
instance.interceptors.request.use(function(config){
    Toast.loading("正在加载中...",0,null,true);
    return config;
},function(error){
    return Promise.reject(error);
});
//响应的拦截
instance.interceptors.response.use(function(response){
    Toast.hide();
    return response.data.message;
},function(error){
    return Promise.reject(error);
});

export default instance
